#if BUOLA_PLATFORM_LINUX

#include <buola/cv/ccloud.h>
#include <buola/cv/trees/cflanntree.h>
#include <buola/cv/registration/icp.h>
#include <buola/app/ccmdline.h>
#include <buola/image/io.h>

using namespace buola;

int main(int pNArg,char **pArgs)
{
    buola_init(pNArg,pArgs);

    cvi::CCloud_f lSrc;
    cvi::CCloud_f lDst;

    int lPoints=25000;
    
    for(int i=0;i<lPoints;i++)
    {
        mat::CVec3f lPoint=mat::random(3,1,random::CDefaultDistribution<float>(0,1));
        
        cvi::CCloud_f::TPoint lP;
        lP.mPoint=lPoint;
        
        lSrc.emplace_back(lP);
        lP.mPoint.x()+=0.07f;
        lDst.emplace_back(lP);
    }
  
    cvi::CFlannTree<double> lDstTree(lDst);
  
    msg_info() << cvi::icp(lSrc,lDstTree) << "\n";
    
    return buola_finish();
}

#else
int main() {}
#endif
